#ifndef _GAL_SURFACE_H_
#define _GAL_SURFACE_H_

/// <summary>
/// GAL Surface
/// </summary>
typedef struct _Surface
{
	int width;
	int height;
	int stride;
	void* data;
	void* private;
	unsigned int size;
	int refcount;
	int type;
	int bpp;

} Surface, *SurfacePtr;

/// <summary>
/// Macros
/// </summary>
#define GAL_SURFACE_DATA 0x01
#define GAL_SURFACE_DISPLAY 0x02
#define GAL_SURFACE_SYSTEMMEMORY 0x03
#define GAL_SURFACE_TEXTURE_2D 0x04
#define GAL_SURFACE_TEXTURE_3D 0x06
#define GAL_SURFACE_DETPH_08BPP 0x01 //  8 bits per pixel.
#define GAL_SURFACE_DETPH_16BPP 0x02 // 16 bits per pixel.
#define GAL_SURFACE_DETPH_24BPP 0x03 // 24 bits per pixel.
#define GAL_SURFACE_DETPH_32BPP 0x04 // 32 bits per pixel.

/// <summary>
/// TODO
/// </summary>
SurfacePtr GalCreateSurface(void);
SurfacePtr GalCreateWindowSurface(void);
SurfacePtr GalCreateDisplaySurface(void);
SurfacePtr GalCreateSurfaceFromData(unsigned char *data, int width, int height, int stride);
SurfacePtr GalCreateMemorySurface(int detph, int width, int height);
int GalSurfaceClear(SurfacePtr surface, Color color);
int GalSaveSurface(SurfacePtr surface, const char *file);
int GalSurfaceDestroy(SurfacePtr surface);

#endif